package com.dingding.entity.request.user;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import lombok.Data;

@Data
@JsonIgnoreProperties(ignoreUnknown = true)
@ApiModel("登录请求参数")
public class LoginRequest {

    @ApiModelProperty(value = "手机号", required = true)
    @NotBlank(message = "请输入11位手机号码")
    @Pattern(regexp = "^[1][3,4,5,6,7,8,9][0-9]{9}$", message = "手机号码格式有误")
    @Size(min = 11, max = 11, message = "请输入11位手机号码")
    private String phoneEmail;

    @NotBlank(message = "验证码ID不能为空")
    @ApiModelProperty(value = "验证码UUID")
    private String key;

    @ApiModelProperty(value = "手机短信验证码", required = true)
    @NotBlank(message = "请输入6位手机验证码")
    @Size(min = 6, max = 6, message = "请输入6位手机验证码")
    private String validateCode;

}
